Repository navigation
Land #530 and #533 for provider 0.10.18 - #534
Merged
Merged
Conversation
…o its pages A complete-checkpoint restore of a lossy (balanced) checkpoint decoded every coded row on the staging thread, then copied it 16 KiB at a time into the staged pages, and the pages themselves were staged as copied host zeros. Models that store their sliding-window layers coded paid this cost on every restore, even for a one-block hit. - With more than one decoding thread (at most eight, and at most half the active cores), the streaming row decoder decodes the whole rows of a transfer call concurrently, a wave of 1,024 rows at a time. Rows of a paged native layer are written straight to their page addresses (CBv2PagedCheckpointStorage.rowTargets, the same addresses append writes); other rows keep the ordered batched sink calls. Each row's bytes are a pure function of its coded bytes, so the restored state is unchanged. A refused row fails the transfer with the same error, and the staged rows are those the sequential decode leaves. - Provider-staged checkpoint segments wrap zero-fill-on-demand pages when the live pool does (PagedKVPoolConfig.hostZeroedSegments), as admission growth already does, instead of copying host zeros into fresh buffers. - The wave's scratch and bookkeeping are charged with the import's decoder scratch. - DARKBLOOM_PREFIX_CACHE_PARALLEL_STAGE=0 keeps every row on the calling thread and the original sink path; a pool without hostZeroedSegments keeps copied host zeros. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…row decode Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CBv2MTPConfig.maxDraftPromptTokens (nil by default) keeps a request whose prompt holds more tokens than the limit target-only for its whole lifetime, as a reasoning budget does: no drafts and no assistant history, so its tokens are the MTP-off engine's. Rows at or under the limit are unchanged; a value below one means no limit.
writeNative now writes into a caller's buffer (writeNative(_:into:)), so the existing testBF16CheckBeforeRoundingRefusesNaNsThatRoundToFiniteWords gives it one row of BF16 destination. The assertion is unchanged: every NaN pattern that rounds to a finite word is refused. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…F16 NaN-rounding test
jonathan308
added a commit
to Layr-Labs/d-inference
that referenced
this pull request
Nov 24, 2026
Pin mlx-swift-lm 20fa3d540d (candidate/0.10.18-c6-sdk, landing PR Layr-Labs/mlx-swift-lm#534): main 4bb2b43ee8 with a merge of #530 (f335812335, the concurrent checkpoint row decode) and a merge of #533 (175069698c, a prompt-length limit for MTP drafting). Against f335812335 it adds only #533's change; #533's provider side and docs are their own PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 of 14 tasks
jonathan308
marked this pull request as ready for review
November 24, 2026 07:03
5 of 8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This lands two PRs on
mainthrough one candidate branch,candidate/0.10.18-c6-sdk. Its head20fa3d540dis a chain of signed merges ontomain4bb2b43ee8. Provider 0.10.18 pins and qualifies this exact commit.Please land it with a merge commit (not squash or rebase), so that
20fa3d540dstays inmain's history.9f450f4df33581233520fa3d54175069698cCBv2MTPConfig.maxDraftPromptTokens, off by default)Both merges are clean
git merge-treeresults; no file conflicted.Test plan
20fa3d540d(workflow dispatch on the exact SHA): run 45343134053, success.AI usage
accurately describes the code changes.